FROM php:7.1-fpm-alpine

LABEL maintainer="Boolean <hongbin.hsu@bincent.com>"

COPY --from=composer /usr/bin/composer /usr/bin/composer

#更换阿里源
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
    && apk update &&apk add --no-cache  --virtual .build-deps autoconf gcc g++ \
        libtool make libmemcached zlib libmemcached-dev libpng \
        libpng-dev freetype-dev libjpeg-turbo-dev gettext-dev libmcrypt-dev \
    && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-png-dir=/usr/include/  \
    && docker-php-ext-configure gd \
    && docker-php-ext-install -j$(nproc) gd gettext bcmath sockets pdo pdo_mysql mysqli \
    && pecl install redis  \
    && docker-php-ext-enable  redis \
    && apk del --purge --progress .build-deps